//js获取数据三步骤
//1. 获取数据，填写配置
//2. 数据格式转换
//3. 使用数据
let rec_music_box = document.querySelector(".rec_music");
axios.get("http://localhost:3000/personalized?limit=6")
    .then(function (data) {
        console.log(data.data.result);
        let recMusicArr = data.data.result
        let str = ``
        for (let i = 0; i < recMusicArr.length; i++) {
            // 遍历数组
            str +=
                `<li>
                    <a href="">
                        <img src="${recMusicArr[i].picUrl}" alt="">
                        <p>${recMusicArr[i].name}</p>
                    </a>
                </li>

            `
        }
        rec_music_box.innerHTML = str
    })